package cn.tedu.basic;

import java.util.Scanner;

public class Test6_If2 {
    public static void main(String[] args) {
        System.out.println("请您输入学员的分数：");
        int score = new Scanner(System.in).nextInt();

        if (score < 0 || score > 100) {
            System.out.println("您输入的数据不合法！！");
            return;//让程序停下来不再向下执行
        }

        String desc = "";
        if (score >= 90) {
            desc = "优秀";
        } else if (score >= 80) {
            desc = "良好";
        } else if (score >= 70) {
            desc = "中等";
        } else if (score >= 60) {
            desc = "及格";
        } else {
            desc = "不及格";
        }
        System.out.println("您的得分是："+score+",属于："+desc);
    }
}
